import java.util.Comparator;
import java.util.*;
public class ComparatorByID implements Comparator<Student> {
    @Override
    public int compare(Student o1, Student o2)
    {
        return Integer.parseInt(o1.getId()) - Integer.parseInt(o2.getId());
    }
}